<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>
	   	<f:event listener="#{userController.initConversation()}" type="preRenderView"></f:event>
	   	<f:viewParam name="userId" value="#{userHome.id}"></f:viewParam>
	   	<f:event listener="#{userHome.initConversation()}" type="preRenderView"></f:event>
	   	<f:viewParam name="moduleName" value="重置密码"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
   
		<h:form id="editForm">         
			<p:panel id="panel" header="重置密码" style="margin-bottom:10px;">
		       <p:messages id="messages" closable="true"><p:autoUpdate/></p:messages>
		        
		        <h:panelGrid columns="2" cellpadding="5">
		        	<p:outputLabel  value="用户名" />	
		        	<h:outputText value="#{userHome.instance.username}" />
		        	
		        	<p:outputLabel  value="名称" />	
		        	<h:outputText value="#{userHome.instance.cnname}" />
		        			      
					<p:outputLabel for="confirmPassword" value="新密码" />						
					<p:password  id="confirmPassword" match="newPassword" validatorMessage="两次输入密码不一致"
							  value="#{userController.newPassword}"
						   required="true" />
						   
					<p:outputLabel for="newPassword" value="确认密码" />		
					<p:password  id="newPassword" 
							  value="#{userController.newPassword}"
						   required="true"/>
				</h:panelGrid>
			</p:panel>
			
			<p:commandButton action="#{userController.resetPassword()}" value="重置" ajax="false" />
			<p:commandButton action="/manage/index.xhtml" value="取消" immediate="true"></p:commandButton>
		</h:form>
      
   	</ui:define>
</ui:composition> 
